<template>
	<el-card class="form-container">
		<el-form :model="editForm" ref="editForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()" label-width="90px">
			<el-form-item label="商品spu编号" prop="goodsSpuCode">
				<el-input v-model="editForm.goodsSpuCode" placeholder="请输入商品spu编号"></el-input>
			</el-form-item>
			<el-form-item label="商品sku编号" prop="goodsSkuCode">
				<el-input v-model="editForm.goodsSkuCode" placeholder="请输入商品sku编号"></el-input>
			</el-form-item>
			<el-form-item label="秒杀标题" prop="seckillName">
				<el-input v-model="editForm.seckillName" placeholder="请输入秒杀标题"></el-input>
			</el-form-item>
			<el-form-item label="秒杀商品图片" prop="goodsImage">
				<el-input v-model="editForm.goodsImage" placeholder="请输入秒杀商品图片"></el-input>
			</el-form-item>
			<el-form-item label="秒杀商品价格" prop="seckillGoodsPrice">
				<el-input v-model="editForm.seckillGoodsPrice" placeholder="请输入秒杀商品价格"></el-input>
			</el-form-item>
			<el-form-item label="秒杀商品折扣:如果存在折扣则秒杀价格不可更改,由商品原价 * 秒杀折扣得出" prop="seckillGoodsRate">
				<el-input v-model="editForm.seckillGoodsRate" placeholder="请输入秒杀商品折扣:如果存在折扣则秒杀价格不可更改,由商品原价 * 秒杀折扣得出"></el-input>
			</el-form-item>
			<el-form-item label="秒杀商品原价" prop="seckillGoodsOriginalPrice">
				<el-input v-model="editForm.seckillGoodsOriginalPrice" placeholder="请输入秒杀商品原价"></el-input>
			</el-form-item>
			<el-form-item label="秒杀商品数量" prop="seckillGoodsCount">
				<el-input v-model="editForm.seckillGoodsCount" placeholder="请输入秒杀商品数量"></el-input>
			</el-form-item>
			<el-form-item label="秒杀剩余库存数" prop="seckillStockCount">
				<el-input v-model="editForm.seckillStockCount" placeholder="请输入秒杀剩余库存数"></el-input>
			</el-form-item>
			<el-form-item label="秒杀每人限购数量" prop="seckillGoodsQuota">
				<el-input v-model="editForm.seckillGoodsQuota" placeholder="请输入秒杀每人限购数量"></el-input>
			</el-form-item>
			<el-form-item label="限购时间编号" prop="seckillSceneCode">
				<el-input v-model="editForm.seckillSceneCode" placeholder="请输入限购时间编号"></el-input>
			</el-form-item>
			<el-form-item label="秒杀编号" prop="seckillCode">
				<el-input v-model="editForm.seckillCode" placeholder="请输入秒杀编号"></el-input>
			</el-form-item>
			<el-form-item label="秒杀商品排序" prop="seckillGoodsSort">
				<el-input v-model="editForm.seckillGoodsSort" placeholder="请输入秒杀商品排序"></el-input>
			</el-form-item>
			<el-form-item label="开始时间" prop="createTime">
				<el-input v-model="editForm.createTime" placeholder="请输入开始时间"></el-input>
			</el-form-item>
			<el-form-item label="结束时间" prop="updateTime">
				<el-input v-model="editForm.updateTime" placeholder="请输入结束时间"></el-input>
			</el-form-item>
			<el-form-item>
				<el-button @click="cancel">取消</el-button>
				<el-button type="primary" @click="submit('dataForm')">确定</el-button>
			</el-form-item>
		</el-form>
	</el-card>
</template>

<script>
	import { findSeckillDetailDetail } from '@/api/activity/seckill'
	export default {
		name: 'user-seckillDetail',
		data() {
			return {
				editForm: {
					goodsSpuCode: '',
					goodsSkuCode: '',
					seckillName: '',
					goodsImage: '',
					seckillGoodsPrice: '',
					seckillGoodsRate: '',
					seckillGoodsOriginalPrice: '',
					seckillGoodsCount: '',
					seckillStockCount: '',
					seckillGoodsQuota: '',
					seckillSceneCode: '',
					seckillCode: '',
					seckillGoodsSort: '',
					createTime: '',
					updateTime: ''
				}
			}
		},
		created() {
			this.editForm.id = this.$route.query.id
			this.view(this.$route.query.id)
		},
		methods: {
			view(val) {
				findSeckillDetailDetail(val).then(res => {
					this.editForm = res.data.responseData
				})
			},
			cancel() {
				this.$router.go(-1)
			},
			update() {

			}
		}
	}
</script>

<style>
</style>
